<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>

    <div class="nav">Nav导航</div>
    <div class="container">内容</div>

    <script>
        // 创建元素
        var newDiv = document.createElement("div");
        console.log(newDiv); // <div></div>
        var text = document.createTextNode("Hello World!");
        newDiv.appendChild(text);

    </script>
</body>
</html>